package com.lsmo.android.util;

public class ResultSetMetaData {
	private String[] columnNames;

	ResultSetMetaData(String[] columnNames) {
		this.columnNames = columnNames;
	}

	public int getColumnCount() {
		return columnNames.length;
	}

	public String getColumenName(int index) {
		return columnNames[index];
	}

	public int getColumenIndex(String name) {
		for (int i = 0; columnNames != null && i < columnNames.length; i++) {
			if (columnNames[i] == name)
				return i;
		}
		return -1;
	}
}